package com.example.shortmessage.receiver;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.telephony.SmsManager;

import com.example.shortmessage.tips.broadcast.NotificationStatus;

/**
 * 发送失败通知
 * @author 27638
 */
public class StatusReceiver extends BroadcastReceiver {
    @Override
    public void onReceive(Context context, Intent intent) {
        NotificationStatus instance = NotificationStatus.getInstance(context);
        instance.notification();
        if (getResultCode() == SmsManager.RESULT_ERROR_GENERIC_FAILURE) {
            NotificationStatus instance1 = NotificationStatus.getInstance(context);
            instance1.notification();
        }
    }
}
